package com.example.blog.service.impl;

import com.example.blog.dao.UserMapper;
import com.example.blog.model.UserInfo;
import com.example.blog.model.vo.UserInfoVO;
import com.example.blog.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author YJ
 * @Date 2023/9/5 15:34
 * Description:
 */
@Service
public class IUserServiceImpl implements IUserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public int reg(UserInfo userInfo) {
        int row = userMapper.reg(userInfo);
        return row;
    }

    @Override
    public UserInfo selectByUserName(String username) {
        return userMapper.selectByUserName(username);
    }

    @Override
    public UserInfoVO selectByUserId(int userId) {
        return userMapper.selectByUserId(userId);
    }
}
